package com.ab.helloworldjava;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {

    final String TAG="tag";
/*
Button   ------可以设置文本内容一个按钮
ImageButton --------不可以设置文本内容   background以及src添加一个image，当前图片上可以做一个有文本内容的图片
 */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //将布局xml文件引入到activity当中
        setContentView(R.layout.activity_main);
        Log.i(TAG,"MainActivity--->onCreate");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.i(TAG,"MainActivity--->onStart");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.i(TAG,"MainActivity--->onDestroy");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.i(TAG,"MainActivity--->onResume");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.i(TAG,"MainActivity--->onStop");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.i(TAG,"MainActivity--->onPause");
    }
}
